package com.slaffka;

import org.jboss.seam.international.status.Messages;
import org.jboss.solder.logging.Logger;

import javax.inject.Inject;
import javax.inject.Singleton;

/**
 * Created with IntelliJ IDEA.
 * User: slaffka
 * Date: 04.11.12
 * Time: 14:01
 * To change this template use File | Settings | File Templates.
 */
@Singleton
public class HelperUtil {

    @Inject
    private Logger log;

    @Inject
    private Messages messages;

    public void printInfo(String msg) {
        log.info(msg);
        messages.info(msg);
    }

    public void printError(Exception e, String msg) {
        log.error(msg);
        messages.error(msg);
        e.printStackTrace();
    }
}
